import fetch from 'utils/fetch';

export function getUserInfoDetail(schoolId) {
    const data = {
        schoolId
    };
    return fetch({
        url: '/education/getUserInfoDetail',
        method: 'post',
        data
    });
}

export function saveLoginInfo(schoolId, roleId, oldRoleId) {
    const data = {
        schoolId,
        roleId,
        oldRoleId
    };
    return fetch({
        url: '/education/saveLoginInfo',
        method: 'post',
        data
    });
}

var LINFYU_API = process.env.LINFYU_API;
// 埋点
export function buriedPoint(data) {
    // debugger
    var data = [...data];
    return fetch({
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
            'AccessToken':data[0].AccessToken
        },
        url: LINFYU_API + "/updata/outerUp",
        method: 'post',
        data: "data="+JSON.stringify(data)
    });
}
